<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue/vue.js"></script>
</head>
<body>

<!-- 页面模板 -->
<div id="app">

    <ul>
       <li v-for="e in emps" onclick="clickMe()">{{e.id}}-{{e.name}}-{{e.sex}}-{{e.age}}</li>
   </ul>

    <ul>
       <li v-for="e in emps" v-on:click="clickMeVue()">{{e.id}}-{{e.name}}-{{e.sex}}-{{e.age}}</li>
   </ul>

    <ul>
        <!--简写方式-->
       <li v-for="e in emps" @click="clickMeVue()">{{e.id}}-{{e.name}}-{{e.sex}}-{{e.age}}</li>
   </ul>

</div>
<script>
    function clickMe() {
        alert(1);
    }

    var app = new Vue({
        el:'#app',
        data:{
            emps:[
                {id:1,name:"chen",sex:1,age:12},
                {id:2,name:"ji",sex:1,age:13},
                {id:3,name:"wei",sex:1,age:14}
            ]
        },
        methods:{
            clickMeVue:function () {
                alert(2);
            }
        }
    })
</script>
</body>
</html>